extends Sprite2D

@export var zd_scene: PackedScene

var timer = Timer.new()
var isStart = true


func KQ():
	if isStart :
		print("开火")
		var ZD = zd_scene.instantiate() as Area2D
		#ZD.position = Vector2.ZERO + Vector2(100,0)
		ZD.position = Vector2(500,0)
		ZD.move(0)
		add_child(ZD)
		isStart = false


func _ready() -> void:
	print("创建")
	timer.wait_time = 0.5
	timer.one_shot = false
	timer.autostart = true
	timer.timeout.connect(timePC)
	timer.start()
	add_child(timer)


func timePC():
	print("计时器开始")
	isStart = true
